import request from '@/utils/request';

export async function changePassword(data) {
  return request('/login/updatePassword', {
    method: 'post',
    data,
  });
}

export async function getUserDetail(params) {
  return request('/user/getUserDetail', {
    method: 'get',
    params,
  });
}

export async function logOut(params) {
  return request('/login/logOut', {
    method: 'get',
    params,
  });
}

// 值班/解除值班
export async function updateDutyState(params) {
  // onDutyState(0未值班1值班)
  return request('/user/updateOnDutyState', {
    params,
    method: 'post',
  });
}

// 获取未读消息
export async function getMsgList(params) {
  return request('/message/getMsgList', {
    params
  })
}

export async function getNewMsgAmount(params) {
  return request('/message/getNewMsgAmount', {
    params
  })
}

// 获取登录用户绑定贵宾室信息
export async function getUserBindRoom(params) {
  return request('/vipRoom/sys/user/getUserBindRoom', {
    method: 'get',
    params,
  })
}